package cn.xiaopengstack.test.framework.mutilModel;

import cn.xiaopengstack.types.framework.strategy.link.mutilModel.ILogicLink;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component("multiRule1")
@Slf4j
public class Rule1 implements ILogicLink<Object, LinkMultiModelFactory.DynamicContext, String> {

    @Override
    public String apply(Object request, LinkMultiModelFactory.DynamicContext dynamic) throws Exception {
        log.info("正在执行multi_rule1, 上下文内容={}", JSONObject.toJSONString(dynamic));
        dynamic.setNumber("123");
        return next(request, dynamic);
    }
}
